package com.hiabr.iep.admin.job;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


/**
 * <p>
 * admin定时任务 xxl-job
 * </p>
 *
 * @author jie huang
 * @since 2023-06-28
 */
@Slf4j
@Component
public class AdminJobHandler {

    @XxlJob("testJob")
    public ReturnT<String> testJob(String param) throws Exception {
        log.info("--------开始执行--------");
        XxlJobHelper.log("--------开始执行--------");
        try {

        } catch (Exception e) {
            log.error("执行失败", e);
            throw e;
        }
        log.info("--------执行结束--------");
        XxlJobHelper.log("--------执行结束--------");
        return ReturnT.SUCCESS;
    }
}
